package cn.ekuma.epos.crm.voucher.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;

import com.openbravo.bean.crm.voucher.VoucherDiary;
import com.openbravo.format.Formats;
import com.openbravo.pos.base.AppLocal;

public class VoucherDiaryTableModel extends AbstractDTOTableModel<VoucherDiary>{

	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		VoucherDiary obj=getObj(rowIndex);
		switch(columnIndex){
		     case  0:
			    return Formats.TIMESTAMP.formatValue(obj.getDate());
		     case 1:
		    	 return obj.getReason();
		     case 2:
		    	 return obj.getUserId();
		    
		     
		}
		return null;
	}

	@Override
	public String[] getColumnNames() {
		return new String[]{
				AppLocal.getIntString("label.createTime"),
				AppLocal.getIntString("label.VoucherDiary.reason"),
				AppLocal.getIntString("label.referncePerson")
		};
	}

}
